package com.sumainfor.pc.cfo.feign;

import com.sumainfor.pc.cfo.fallback.TenantFeignFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Collection;
import java.util.List;
import java.util.Map;

/**
 * @Author PuaChen
 * @Create 2019-05-06 14:42
 * 租客端服务
 */
@FeignClient(name = "TANGNEST-WX-TENANT", fallback = TenantFeignFallback.class)
public interface BaseTenantFeign {

    ///////////////////////////////////////////////////////////////////////////
    // Eddy Chen
    ///////////////////////////////////////////////////////////////////////////

    /**
     * 模糊查询租客数据信息
     *
     * @param search
     * @return
     */
    @PostMapping("/key/provider/cfo/getUserInfoListByLikeSelect")
    List<Map<String, Object>> getUserInfoListByLikeSelect(@RequestParam("search") String search);

    /**
     * 根据传入的租客编号集合 查询租客信息数据
     *
     * @param ids
     * @return
     */
    @PostMapping("/key/provider/cfo/selectTenantInfoByIdList")
    List<Map<String, Object>> selectTenantInfoByIdList(@RequestBody Collection<String> ids);
}
